package com.ruoyi.functiontest.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.functiontest.mapper.TollBridgeStatTestMapper;
import com.ruoyi.functiontest.domain.TollBridgeStatTest;
import com.ruoyi.functiontest.service.ITollBridgeStatTestService;
import com.ruoyi.common.utils.StringUtils;

/**
 * 收费桥梁统计测试Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TollBridgeStatTestServiceImpl implements ITollBridgeStatTestService 
{
    @Autowired
    private TollBridgeStatTestMapper tollBridgeStatTestMapper;

    /**
     * 查询收费桥梁统计测试
     * 
     * @param id 收费桥梁统计测试主键
     * @return 收费桥梁统计测试
     */
    @Override
    public TollBridgeStatTest selectTollBridgeStatTestById(Long id)
    {
        return tollBridgeStatTestMapper.selectTollBridgeStatTestById(id);
    }

    /**
     * 查询收费桥梁统计测试列表
     * 
     * @param tollBridgeStatTest 收费桥梁统计测试
     * @return 收费桥梁统计测试
     */
    @Override
    public List<TollBridgeStatTest> selectTollBridgeStatTestList(TollBridgeStatTest tollBridgeStatTest)
    {
        return tollBridgeStatTestMapper.selectTollBridgeStatTestList(tollBridgeStatTest);
    }

    /**
     * 新增收费桥梁统计测试
     * 
     * @param tollBridgeStatTest 收费桥梁统计测试
     * @return 结果
     */
    @Override
    public int insertTollBridgeStatTest(TollBridgeStatTest tollBridgeStatTest)
    {
        return tollBridgeStatTestMapper.insertTollBridgeStatTest(tollBridgeStatTest);
    }

    /**
     * 修改收费桥梁统计测试
     * 
     * @param tollBridgeStatTest 收费桥梁统计测试
     * @return 结果
     */
    @Override
    public int updateTollBridgeStatTest(TollBridgeStatTest tollBridgeStatTest)
    {
        return tollBridgeStatTestMapper.updateTollBridgeStatTest(tollBridgeStatTest);
    }

    /**
     * 批量删除收费桥梁统计测试
     * 
     * @param ids 需要删除的收费桥梁统计测试主键
     * @return 结果
     */
    @Override
    public int deleteTollBridgeStatTestByIds(Long[] ids)
    {
        return tollBridgeStatTestMapper.deleteTollBridgeStatTestByIds(ids);
    }

    /**
     * 删除收费桥梁统计测试信息
     * 
     * @param id 收费桥梁统计测试主键
     * @return 结果
     */
    @Override
    public int deleteTollBridgeStatTestById(Long id)
    {
        return tollBridgeStatTestMapper.deleteTollBridgeStatTestById(id);
    }
    
    /**
     * 根据ID查询是否有子节点
     * 
     * @param id 节点ID
     * @return 结果
     */
    @Override
    public boolean hasChildById(Long id)
    {
        return tollBridgeStatTestMapper.hasChildById(id) > 0;
    }
}
